﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace TjZheng.CMS.Process
{
    public static class ControlsExtension
    {
        /// <summary>
        /// 引用上传控件资源
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <returns></returns>
        public static MvcHtmlString CreateUpLoadSource(this HtmlHelper htmlHelper)
        {
            return MvcHtmlString.Create("<link href=\"/Content/uploadify/uploadify.css\" rel=\"stylesheet\" /><link href=\"/Content/uploadify/uploadify-imgpreview.css\" rel=\"stylesheet\" /><script src=\"/Content/uploadify/jquery.uploadify.js\"></script><script src=\"/Content/js/uploadify.js\"></script>");
        }
        /// <summary>
        /// 引用编辑器资源
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <returns></returns>
        public static MvcHtmlString CreateEditorSource(this HtmlHelper htmlHelper)
        {
            return MvcHtmlString.Create("<script src=\"/Content/ueditor/ueditor.config.js\"></script><script src=\"/Content/ueditor/ueditor.all.min.js\"></script><script src=\"/Content/ueditor/lang/zh-cn/zh-cn.js\"></script>");

        }
        /// <summary>
        /// 引用弹窗资源
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <returns></returns>
        public static MvcHtmlString CreateDialogSource(this HtmlHelper htmlHelper)
        {
            return MvcHtmlString.Create("<script src=\"/Content/js/bizdialog.js\"></script>");
        }
    }
}
